#!/bin/sh
#
# chkconfig: 3 90 14
# Source function library.

pidfile=/var/run/pid/nginx-lounge.pid

if [ -f /etc/rc.d/init.d/functions ]; then
	. /etc/rc.d/init.d/functions
	START="daemon"
	STOP="killproc -d 10"
else
	. /lib/lsb/init-functions
	START="start-stop-daemon --start --exec"
	STOP="start-stop-daemon --stop --exec"
fi

start() {
	echo -n $"Starting Lounge Dumbproxy (NGINX): "
	$START /usr/bin/nginx-lounge
	RETVAL=$?
	echo
	return $RETVAL
}

stop() {
	echo -n $"Stopping Lounge Dumbproxy (NGINX): "
	$STOP /usr/bin/nginx-lounge
	RETVAL=$?
	echo
	return $RETVAL
}

# See how we were called.
case "$1" in
    start)
	start
	;;
    stop)
	stop
	;;
	status)
	status opinmindd.py
	;;
    restart)
	stop
	start
	;;
    condrestart)
	;;
    reload)
        ;;
    *)
	echo $"Usage: $0 {start|stop|restart|condrestart|reload}"
	;;
esac
exit $RETVAL
